<?
require_once('FuncionesInternacion.php');

if(isset($_POST['nameFormEgresoInternacion']))
{
    EgresarPacienteInternacion();
}
    
?>

<form name="nameFormEgresoInternacion" id="iFormEgresoInternacion"  method="POST" enctype="multipart/form-data">
<table width="100%">
        <tr>
             <td width="100%" align="center">
                <table width="100%" align="center">
                    <tr>
                        <td align="center">
                            <font class="" color="white"   size="3px" id=""> <b> Egreso</b></font> 
                        </td>
                        <td align="right">
                            <a href="javascript:window.print();">
                                <img title="Imprimir Ficha Ingreso" border="0" src="images/Dispositivos/print.png" id="idImprimirFichaIngreso"  width="30px" height="30px" class='printbutton'/>
                            </a>
                        </td>
                	</tr>
                     <tr>
                         <td width="100%" align="center">
                            <table align="center" >        
                                <tr>
                                    <td width="100%">
                                        <table width="100%" align="center"  style="margin-right:-25px;  background-color: white; border-style: solid;border-color: white;border-radius:5px;" >                           
                                            <tr>
                                                <td width="100%" align="center"> 
                                                    <? require_once('Grid/gridinternados.php');?>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                	<div class="demo">
                                               		    <input type="button" id="getPacienteInternado" style="width:120px;  font-size:10px;" name="namegetPacienteInternado" value="Seleccionar" />      
                              				 		</div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>                                       						
                				</tr>
    
                            </table>
                        </td>
                   </tr>
                    <tr>
                        <td width="100%" align="center">
                            <table width="40%" align="center">

                            </table>
                        </td>
                    </tr>   
                    <tr>
                        <td width="100%">
                            <table width="100%">
                                <tr>
                                    <td align="right" width="35%"> 
                                        <font class="" size="2px"  color="white"  id=""> Sector de Internacion</font> 
                                    </td>
                                    <td width="5%">
                                    </td>
            						<td width="60%">
                                        <input type="text" name="nameSectorEgresoInternacion" disabled="" style="width:200px" maxlength="15"  />
                                    </td>                                            
                                </tr>
                            </table>
                        </td>                                       						
					</tr>
			        <tr>
                         <td width="100%">
                            <table width="100%">
                                <tr>
            			            <td align="right" width="35%">
                                        <font class="" size="2px"  color="white"  >
                                            Fecha Egreso
                                        </font>
                                    </td>
            			            <td width="5%">
                                    </td>
                                    <td width="60%">
                                       <input type="text" name="nameFechaIngresoInternacion" style="width:200px" maxlength="15" value="<?echo date("d/m/Y, g:ia");?>"/>
                                    </td>
                                </tr>
                           </table>
                         </td>
			        </tr>
			        <tr>
                         <td width="100%">
                            <table width="100%">
                                <tr>                            
            			            <td align="right" width="35%">
                                        <font class="" size="2px"  color="white"  id="">
                                            Apellido 
                                        </font>
                                    </td>
                                    <td width="5%">
                                    </td>
            			            <td width="60%">
                                        <input type="text" name="nameNombreEgresoInternacion" disabled="" style="width:200px" maxlength="50" value=""/>                                             
                                    </td>
                                </tr>
                           </table>
                         </td>
			        </tr>
			         <tr>
                         <td width="100%">
                            <table width="100%">
                                <tr>    
            			            <td align="right" width="35%">
                                        <font class="" size="2px"  color="white"  id="">
                                            N&uacute;mero Documento
                                        </font>
                                    </td>
            			            <td width="5%">
                                    </td>
                                    <td width="60%">
                                        <input type="text" name="nameDocumentoEgresoInternacion" disabled="" 
                                        style="width:200px" maxlength="11" value=""/>                                                 
                                    </td>
                                </tr>
                           </table>
                         </td>
			        </tr>
			         <tr>
                         <td width="100%">
                            <table width="100%">
                                <tr>    
            			            <td align="right" width="35%">
                                        <font class="" size="2px"  color="white"  id="">
                                            Estado
                                        </font>
                                    </td>
            			            <td width="5%">
                                    </td>
                                    <td width="60%">
                                        <select name="nameEstadoEgreso"  style="width:200px"  >
                                            <option>Vivo </option>
                                            <option>Fallecido </option>
                                        </select>                                               
                                    </td>
                                </tr>
                           </table>
                         </td>
			        </tr>                    
			         <tr>
                        <td width="100%">
                            <table width="100%">
                                <tr>                               
            			            <td align="right" width="35%">
                                        <font class="" size="2px"  color="white">
                                         Diagn&oacute;stico de Egreso
                                        </font>
                                    </td>
                                    <td width="5%">
                                    </td>
            			            <td width="60%">
                                        <textarea name="nameDiagEgresoInternacion" style="width:200px"  rows="4"></textarea> 
                                    </td>
                                </tr>
                           </table>
                         </td>  
			        </tr>
    		        <tr>
                        <td width="100%">
                            <table width="100%">
                                <tr> 
            			            <td align="right" width="35%">
                                        <font class="" size="2px"  color="white"  id="">
                                            M&eacute;dico
                                        </font>
                                    </td>
                                    <td width="5%">
                                    </td>
            			            <td width="60%">
                                        <input type="text" name="nameMedicoInternacion" disabled="" value="<? echo $_SESSION['ApellidoLogin'].", ".$_SESSION['NombreLogin'];?>" style="width:200px" maxlength="30" />
                                   </td>
                                </tr>
                           </table>
                         </td>      
    		        </tr>        
    		        <tr>
                        <td width="100%">
                            <table width="100%">
                                <tr> 
            			            <td align="right" width="35%">
                                        <font class="" size="2px"  color="white"  id="">
                                            Matr&iacute;cula 
                                        </font>
                                    </td>
                                    <td width="5%">
                                    </td>
            			            <td width="60%">
                                        <input type="text" name="nameMatriculaInternacion" disabled="" value="<? echo $_SESSION['Matricula'];?>" style="width:200px" maxlength="30" />
                                   </td>
                                </tr>
                           </table>
                         </td>      
    		        </tr>   
    		        <tr>
                        <td width="100%">
                            <table width="100%">
                                <tr> 
            			            <td align="right" width="35%">
                                        <font class="" size="2px"  color="white"  id="">
                                            Firma Digital
                                        </font>
                                    </td>
                                    <td width="5%">
                                    </td>
            			            <td width="60%">
                                       
                                   </td>
                                </tr>
                           </table>
                         </td>      
    		        </tr>   
			        <tr>
				        <td height="5px" >
				        </td>
			        </tr>     
                </table>
            </td>
        </tr>
        <tr>
            <td width="100%" align="center">
                <table width="40%" align="center">
                    <tr>
                        <td>
                        	<div class="demo">
                        	   <input  style=" width:100px; font-size:10px;" type="submit" name="nameSubmitEgresoInternacion" value="Egreso" />
                        	</div>
                        </td>
                        <td align="right">
                        	<div class="demo">
                       		   <input  style="width:100px; font-size:10px;" type="button" onclick="cerrarCancelarEgreso();" name="nameCancelarEgreso" value="Cancelar"/>
                        	</div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr> 

</table>
</form>